#ifndef _TD_RECTANGLE_SHAPE_H_
#define _TD_RECTANGLE_SHAPE_H_

/************************************************************************/
/* STL                                                                  */
/************************************************************************/
#include <iostream>

/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/BaseShape.h"

namespace TD_Core {
	
	class RectangleShape : public BaseShape {

		/**Width and height */
		Coord2D m_boundaries;

	public:
		/************************************************************************/
		/* Constructors                                                         */
		/************************************************************************/
		//Default constructor
		explicit RectangleShape();
		
		//Copy constructor
		explicit RectangleShape(const RectangleShape &rhs);

		//Assignment constructor
		RectangleShape & operator=(const RectangleShape & rhs);
	
		//Initialization constructor
		explicit RectangleShape(const Coord2D &position, const Coord2D &size);
		
		~RectangleShape();
		
		
		/************************************************************************/
		/* Access functions                                                     */
		/************************************************************************/
		inline const Coord2D & getLeftTopCorner() const {
			return(m_position);
		}

		inline Coord2D getRightBottomCorner() const {
			return(m_position + m_boundaries);
		}

		virtual inline const Coord2D & getBoundaries() const {
			return(m_boundaries);
		}

		
		/************************************************************************/
		/* Functionalities                                                      */
		/************************************************************************/
		/**Collision check:*/
		virtual bool collisionCheck(BaseShape *other);
		virtual bool collisionCheck(const Coord2D &position);
	};
}

#endif